<template>
  <div>
    <!-- <Banner />
    <Hot />
    <Recommend /> -->
    <Index />
    <Binding :visible="visible" @close="close" />
  </div>
</template>

<script>
import { GET_ACCESS_TOKEN } from './mine/server'
export default {
  layout: "main",
  components: {
    // Banner: () => import("~/components/home/banner"),
    // Hot: () => import("~/components/home/hot"),
    // Recommend: () => import("~/components/home/recommend")
    Index: () => import("~/components/home/index"),
    Binding: () => import("~/components/home/binding")
  },
  data() {
    return {
      auth_code: '',
      visible: false
    }
  },
  created() {
    // if (this.$route.query.auth_code) {
    //   this.auth_code = this.$route.query.auth_code
    //   GET_ACCESS_TOKEN({
    //     auth_code: this.auth_code
    //   }).then(res => {
    //     if (res == 200) {
    //       this.visible = true
    //     }
    //   })
    // }
  },
  methods: {
    close() {
      this.visible = false
    }
  }
};
</script>
